package com.gitee.wsl.common.ui.ext

import androidx.compose.ui.geometry.MutableRect
import androidx.compose.ui.graphics.Canvas
import androidx.compose.ui.graphics.Paint
import androidx.compose.ui.graphics.nativeCanvas

actual fun Canvas.saveLayer(rect : MutableRect, paint : Paint, flag : Int) {
    nativeCanvas.saveLayer(
        left = rect.left,
        top = rect.top,
        right = rect.right,
        bottom = rect.bottom,
        paint = paint.asFrameworkPaint()
    )
}